#include <Windows.h>
#include <assert.h>

int main(int argc, char* argv[]) {
	if (argc != 2) {
		printf("Usage: %s HexNumber\n", argv[0]);
		return 0;
	}

	{
		unsigned int i = 0;
		unsigned int j = 0x80000000;
		unsigned int k;

		sscanf(argv[1], "%x", &i);

		for (k = 0; k < 32; ++k) {
			if (
				(i & (j >> k)) == 0
				) {
				printf("%d", 0);
			} else {
				printf("%d", 1);
			}

			{
				unsigned int z = 31 - k;
				switch (z)
				{
				case 30:
				case 29:
				case 28:
				case 16:
					printf(" ");
					break;
				}
			}
		} // end of for
	}
	return 0;
}
